package com.googlecode.particlesys.objects;

public class Position {

	protected int x;
	protected int y;
	protected int width;
	protected int height;
	
	public Position(){
		;
	}
	
	public Position(int width, int height){
		this();
		this.width = width;
		this.height = height;
	}
	
	public boolean intersects(Position other){
		return x >= other.x && x <= other.x+other.width && y >= other.y && y <= other.y+other.height;
	}
	
	public int getX(){
		return x;
	}
	
	public void setX(int x){
		this.x = x;
	}
	
	public int getY(){
		return y;
	}
	
	public void setY(int y){
		this.y = y;
	}

	public int getWidth(){
		return width;
	}

	public void setWidth(int width){
		this.width = width;
	}

	public int getHeight(){
		return height;
	}

	public void setHeight(int height){
		this.height = height;
	}
}